LIBPATH = ./
INCLUDE = -I./ -I../../base
CFLAG = -g -fPIC -D__posix $(INCLUDE)
#I386 = -m elf_i386
CC = g++

BASE_PATH = ../../base
BASE_OBJS = cgi.o

all: CGI

clean:
	-rm *.o;

%.o : %.cpp
	$(CC) $(CFLAG) -c -o $@ $^ -m32

cgi.o: $(BASE_PATH)/cgi.cpp
	$(CC) $(CFLAG) -c -o $@ $^ -m32

CGI: $(BASE_OBJS) $(cgi).o
	$(CC) -o $(cgi) $^ $(I386) -m32